Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specialized Relayer Doc Enhancement #49

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

MJiyoonP
Copy link

@MJiyoonP MJiyoonP commented Sep 2, 2024

Description

Specialized Relayer documentation expanded with detailed examples and a step-by-step guide to setting up and configuring Specialized Relayers. New sections clarify the differences between Standard and Specialized Relayers, provide troubleshooting tips for common issues, and offer a real-world example involving cross-chain asset transfers. This update is designed to make the documentation more accessible and practical for developers working with Wormhole's relayer infrastructure.

Checklist

  • [ X] Required - I have added a label to this PR 🏷️
  • [X ] Required - I have run my changes through Grammarly
  • [ X] If pages have been moved, I have created redirects in the wormhole-mkdocs repo

@MJiyoonP MJiyoonP changed the title Enhanced Documentation for Cross-Chain Token Application Specialized Relayer Doc Enhancement Sep 2, 2024
Copy link
Collaborator

@eshaben eshaben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MJiyoonP Thanks for opening the PR! 💜

Left some comments that need to please be addressed. Thanks!

Comment on lines +14 to +16
### Key Concepts

Before diving into implementation, it's crucial to understand the core components of Wormhole and how messages are sent and received across chains. This includes understanding VAAs (Verifiable Action Approvals), which are central to the security and functionality of relayers.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section doesn't actually cover any key concepts; it just mentions the importance of understanding them, so I'd like to see some links to other pages in the docs here where users can find out more information about these key concepts or for you to add content here if there is anything missing from other parts of the docs.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Will look to add links to other pages in docs here! 👍

Comment on lines 22 to 40
#### Example Real-World Example: Cross-Chain Asset Transfers

Let's consider a real-world scenario where you set up a specialized relayer for asset transfers between Ethereum and Solana.

1. **Setting Up the Emitter**:
- Define the emitter address, which is the contract on the source chain (Ethereum) responsible for emitting the message.

2. **Listening for VAAs**:
- Implement a Spy process that listens for VAAs from the Guardian Network. The Spy will monitor for specific `chainID` and `emitter` values.

3. **Fetching and Relaying the VAA**:
- Once the VAA is detected, use the `getSignedVAAWithRetry` function to fetch it. This VAA is then relayed to the target chain (Solana) where it is processed.

4. **Performing Off-Chain Computation**:
- If necessary, perform any off-chain computation required before the message is relayed to the target contract. This might include gas optimization calculations or conditional logic for message delivery.

5. **Deploy and Test**:
- Deploy your specialized relayer and test it with a mock transaction to ensure it functions as expected.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a page in the Infrastructure section about running a custom relaying service that covers this content. So, can you please remove this content from here and refer to that page and fill in any gaps there as needed?

@@ -81,13 +87,38 @@ There are two main methods of setting up a specialized relayer:
- **Spy relaying** - involves listening directly to the Guardian Network via a Spy
- **REST relaying** - provides a REST endpoint to accept a VAA that should be relayed

**Detailed Setup Process**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a page in the Infrastructure section about running a custom relaying service that covers this content. So, can you please remove this content from here and refer to that page and fill in any gaps there as needed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants